﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ViewCart.aspx.cs" Inherits="ViewCart" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
        EmptyDataText="Giỏ hàng đang rỗng" ForeColor="#333333" OnRowDeleting="GridView1_RowDeleting"
        Width="100%" ShowFooter="True" GridLines="None">
        <FooterStyle BackColor="#66929D" Font-Bold="True" ForeColor="White" />
        <EmptyDataRowStyle Font-Bold="True" Font-Size="18pt" ForeColor="Red" HorizontalAlign="Center" BackColor="Yellow" Height="50px" />
        <Columns>
            <asp:BoundField DataField="ProductID" HeaderText="ID" />
            <asp:TemplateField HeaderText="Tên sản phẩm">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("ProductName") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("ProductID", "ProductDetail.aspx?ProductID={0}") %>'
                        Text='<%# Eval("ProductName") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="UnitPrice" DataFormatString="{0:0,0} VNĐ" 
                HeaderText="Giá bán" />
            <asp:TemplateField HeaderText="Số lượng" FooterText="Tổng cộng: ">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:TextBox ID="txtQuantity" runat="server" Text='<%# Eval("Quantity") %>' Width="52px"></asp:TextBox>
                    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtQuantity"
                        ErrorMessage="CompareValidator" Operator="GreaterThan" Type="Integer" ValueToCompare="0"></asp:CompareValidator>
                </ItemTemplate>
                <FooterStyle Font-Bold="True" HorizontalAlign="Right" />
            </asp:TemplateField>
            <asp:BoundField DataField="Amount" DataFormatString="{0:0,0} VNĐ" 
                HeaderText="Thành tiền" FooterText="$ 0.00" >
                <FooterStyle Font-Bold="True" ForeColor="Red" />
            </asp:BoundField>
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
        <RowStyle BackColor="#E3EAEB" />
        <EditRowStyle BackColor="#7C6F57" />
        <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
        <PagerStyle BackColor="#66929D" ForeColor="White" HorizontalAlign="Center" />
        <HeaderStyle BackColor="#66929D" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" />
        <SortedAscendingCellStyle BackColor="#F8FAFA" />
        <SortedAscendingHeaderStyle BackColor="#246B61" />
        <SortedDescendingCellStyle BackColor="#D4DFE1" />
        <SortedDescendingHeaderStyle BackColor="#15524A" />
    </asp:GridView>
    <table style="width: 100%">
        <tr>
            <td style="width: 148px">
                <asp:Label ID="Label63" runat="server" Text="Khu Vực"></asp:Label>:</td>
            <td>
                <asp:DropDownList ID="khuVucCBX" runat="server" AutoPostBack="True" 
                    onselectedindexchanged="khuVucCBX_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
        </tr>
    </table>
    <table style="width: 100%">
        <tr>
            <td style="width: 148px">
                <asp:Label ID="Label3" runat="server" Text="Thành phố"></asp:Label>
                :</td>
            <td>
                <asp:DropDownList ID="dsThanhPhoCBX" runat="server">
                </asp:DropDownList>
             </td>             
        </tr>
    </table>
    <table style="width: 100%">
        <tr>
            <td style="width: 148px">
                <asp:Label ID="Label4" runat="server" Text="Hình thức vận chuyển"></asp:Label>
                :</td>
            <td>
                <asp:DropDownList ID="dsHinhThucCBX" runat="server" 
                    onselectedindexchanged="dsKhuVucCBX_SelectedIndexChanged" 
                    AutoPostBack="True">
                </asp:DropDownList>
            </td>
            <td>
                 <asp:Label ID="Label5" runat="server" Text="Giá tiền"></asp:Label>
                 :</td>
             <td>
                 <asp:TextBox ID="giaTienTXT" ReadOnly="true" runat="server">50</asp:TextBox>
             </td>
        </tr>
    </table>
&nbsp;<table border="0" cellpadding="10" cellspacing="0" width="100%">

        <tr>
            <td align="center">
    <asp:Button ID="btnUpdate" runat="server" OnClick="btnUpdate_Click" Text="Cập Nhật" 
                    Width="120px" />&nbsp;
    <asp:Button ID="btnClear" runat="server" OnClick="btnClear_Click" Text="Xóa Hết" 
                    Width="120px" />
    <asp:Button ID="btnCheckout" runat="server" OnClick="btnCheckout_Click" Text="Thanh Toán" 
                    Width="120px" /></td>
        </tr>
    </table>
</asp:Content>

